﻿using System;

namespace Castle.MonoRail.ExtensionMethods.Helpers {
	public static class ArrayExtensions {
		public static void ForEach<T>(this T[] e, Action<T, int> a) {
			for (int i = 0; i < e.Length; i++) {
				a(e[i], i);
			}
		}

		public static void ForEach(this Array e, Action<int> a) {
			for (int i = 0; i < e.Length; i++) {
				a(i);
			}
		}
	}
}